const first = () => (new Promise((resolve, reject) => {
    console.log(3);
    let p = new Promise((resolve, reject) => {
        console.log(7);
        setTimeout(() => {   // 宏1
            console.log(5);
            resolve(6);            /// 知识点：promise状态一经改变不会改变
            console.log(p);
        }, 0);
        resolve(1);
    });

    resolve(2); 
    p.then((arg) => {   // 微1
        console.log(arg);
    });
}));


first().then((arg) => {   // 微2
    console.log(arg);
});

console.log(4);


// 3 -> 7 -> 4 -> 1 -> 2 -> 5 -> Promise{1}